package com.zeny.coding.enmus;

import lombok.Getter;
@SuppressWarnings("all")
@Getter
public enum FileUseEnum {

    COURSE("c", "课程"),
    TEACHER("t", "讲师");

    private String code;

    private String desc;

    FileUseEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static FileUseEnum getByCode(String code){
        for(FileUseEnum e: FileUseEnum.values()){
            if(code.equals(e.getCode())){
                return e;
            }
        }
        return  null;
    }
}
